<?php
// +----------------------------------------------------------------------
// | QSCMS
// +----------------------------------------------------------------------
// | Copyright (c)  2025 https://www.qqss.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed QSCMS is not free software, commercial use must purchase official license from official website to avoid unnecessary legal disputes.
// +----------------------------------------------------------------------
// | Author: Contract 990504246@qq.com
// +----------------------------------------------------------------------

namespace app\userapi\event;

class GoodsComment
{
    public function action($comment, $event_name)
    {
        switch ($event_name) {
            case 'goods.comment.submit':
                $this->goodsComment($comment);
                break;
            case 'goods.comment.like':
                $this->likeComment($comment);
                break;
        }
    }

    // 商品被评论
    public function goodsComment($comment)
    {
        // 通知商品被评论

        // 评论这经验逻辑
    }

    // 评论被喜欢
    public function likeComment($comment)
    {
        // 发送邮件通知
    }
}